<?php
/**
 * Register widget area.
 *
 * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
 */
function wpgl_widgets_init()
{

    register_sidebar(array(
        'name' => esc_html__('右侧边栏1', 'wpgl'),
        'id' => 'sidebar-single-1',
        'description' => esc_html__('Add widgets here.', 'wpgl'),
        'before_widget' => '<section id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</section>',
        'before_title' => '<h2 class="widget-title secondary-font">',
        'after_title' => '</h2>',
    ));

    register_sidebar(array(
        'name' => esc_html__('首页区域1', 'wpgl'),
        'id' => 'sidebar-home-1',
        'description' => esc_html__('Add widgets here.', 'wpgl'),
        'before_widget' => '<section id="%1$s" class="widget clearfix %2$s">',
        'after_widget' => '</section>',
        'before_title' => '<h2 class="widget-title secondary-font mt-20 mb-20 clearfix">',
        'after_title' => '</h2>',
    ));


}

add_action('widgets_init', 'wpgl_widgets_init');

/**
 * widget init
 */
require get_template_directory() . '/inc/widgets/widgets.php';